package design_pattern.factory.abstract_factory;

public class ColourFactory extends AbstractFactory {
    @Override
    public Colour getColour(String colour) {
        switch (colour){
            case "red":
                return new Red();
            case "yellow":
                return new Yellow();
            default:
                throw new RuntimeException("没有这个颜色");
        }
    }

    @Override
    public Book getBook(String book) {
        return null;
    }
}
